{include file="common/head"/}
<div class="admin-main layui-anim layui-anim-upbit" ng-app="hd" ng-controller="ctrl">
    <fieldset class="layui-elem-field layui-field-title">
        <legend>{$title}</legend>
    </fieldset>
    <form class="layui-form layui-form-pane">
        <div class="layui-form-item">
            <label class="layui-form-label">会员编号</label>
            <div class="layui-input-4">
                <input type="text" name="nickname" ng-model="field.nickname" lay-verify="nickname" placeholder="输入会员编号" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                必填
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">会员手机号</label>
            <div class="layui-input-4">
                <input type="text" name="mobile" ng-model="field.mobile" lay-verify="mobile" placeholder="输入会员手机号" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                必填
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">会员姓名</label>
            <div class="layui-input-4">
                <input type="text" name="username" ng-model="field.username" lay-verify="username" placeholder="输入会员姓名" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                必填
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">身份证号：</label>
            <div class="layui-input-4">
                <input type="text" name="shenfenzheng" ng-model="field.shenfenzheng" lay-verify="shenfenzheng" placeholder="请输入身份证号" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                只能填写数字
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">会员密码：</label>
            <div class="layui-input-4">
                <input type="text" name="password" ng-model="field.password" lay-verify="password" placeholder="请输入会员密码" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                只能填写数字
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">开户行名称：</label>
            <div class="layui-input-4">
                <input type="text" name="bank_name" ng-model="field.bank_name" lay-verify="bank_name" placeholder="请输入银行开户行名称" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                如： 中国农业银行，支付宝可以填支付宝
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">开户行地址：</label>
            <div class="layui-input-4">
                <input type="text" name="bank_dizhi" ng-model="field.bank_dizhi" lay-verify="bank_dizhi" placeholder="请输入银行开户行地址" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                如： 开发区支行
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">开户卡号：</label>
            <div class="layui-input-4">
                <input type="text" name="bank_card" ng-model="field.bank_card" lay-verify="bank_card" placeholder="输入银行账号" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                请输入银行卡号
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">推荐人编号</label>
            <div class="layui-input-4">
                <input type="text" name="topmobi" ng-model="field.topmobi"  placeholder="输入推荐人编号" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
              必填
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">安置人编号</label>
            <div class="layui-input-4">
                <input type="text" name="fathername" ng-model="field.fathername"  placeholder="输入安置人编号" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
              必填
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">服务中心编号</label>
            <div class="layui-input-4">
                <input type="text" name="center_id" ng-model="field.center_id"  placeholder="输入服务中心编号" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
              必填
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">安置区域</label>
            <div class="layui-input-4">
                <select name="treeplace">
                    <option value="1">A区</option>
                    <option value="2">B区</option>
                </select>
            </div>
            <div class="layui-form-mid layui-word-aux">
                
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">报单级别</label>
            <div class="layui-input-4">
                <select name="level">
                    {volist name='levels' id='vl'}
                    <option value="{$vl.level}">{$vl.level_name}</option>
                    {/volist}
                </select>
            </div>
            <div class="layui-form-mid layui-word-aux">

            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn" lay-submit="" lay-filter="sub">{:lang('submit')}</button>
                <a href="{:url('index')}" class="layui-btn layui-btn-primary">{:lang('back')}</a>
            </div>
        </div>
    </form>
</div>
{include file="common/foot"/}
<script src="/static/plugins/layui/layui.js"></script>
<script>
    layui.use(['form', 'layer'], function () {
        var form = layui.form,$ = layui.jquery;
        // 登录提交监听
        form.on('submit(sub)', function (data) {
            var loading = layer.load(1, {shade: [0.1, '#fff']});
            $.post("{:url('regist')}",data.field,function(res){
                layer.close(loading);
                if(res.code > 0){
                    layer.msg(res.msg,{time:1000,icon:1},function(){
                        location.href = "{:url('daili')}";
                    });
                }else{
                    layer.msg(res.msg,{time:1000,icon:2});
                    $('.captcha img').attr('src','{:url("verify")}?id='+Math.random());
                }
            });
        })
    })
</script>

</body>
</html>